package com.itheima.dubbo.service;

import com.itheima.dubbo.UserInterface;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.rpc.RpcContext;

//
//@DubboService(timeout = 4000)
@DubboService
public class UserServiceImpl implements UserInterface {
    @Override
    public String hello(String name) {
        System.err.println("测试1");
//        try {
//            Thread.sleep(4000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        System.out.println(RpcContext.getContext().getAttachment("index"));
        return "Hello Dubbo username: " + name;
    }
}
